const babelJest = require('babel-jest')

const transform = babelJest.createTransformer({
  presets: ['@babel/preset-flow', '@babel/preset-react'],
  plugins: [
    '@babel/plugin-transform-modules-commonjs',
    '@babel/plugin-syntax-dynamic-import',
    ['@babel/plugin-proposal-decorators', { legacy: true }],
  ],
})

module.exports = transform